package com.atguigu.MyTest;

import java.util.List;

/**
 * @author haoranlu
 * @project IntelliJ IDEA
 */
public class OrderItemDAOImp1 extends BasicDAO<OrderItem> implements OrderItemDAO{
    @Override
    public List<OrderItem> getOrderItemsByOrderId(String orderId) {
    String sql = "select * from order_items where order_id as orderId = ?";
        List<OrderItem> beanList = getBeanList(sql,orderId);
        return beanList;
    }

    @Override
    public void batchInsertItems(Object[][] params) {
    String sql = "insert into order_items values(null,?,?,?,?,?,?,?)";
    batchUpdate(sql,params);
    }
}
